package com.woniuxy.store.client;

import com.woniuxy.store.client.param.AddMemberLevelParam;
import com.woniuxy.store.client.param.ModifyMemberLevelParam;
import com.woniuxy.store.client.result.MemberLevelDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import result.Result;

import java.util.List;

/**
* name是项目名，contextId是client的名字
*/
@FeignClient(contextId = "memberLevelClient",name="store",path="/store/manage")
public interface MemberLevelClient {

    @PostMapping("/level")
    public Result addMemberLevel(@RequestBody AddMemberLevelParam param);

    @PutMapping("/level")
    public Result modifyMemberLevel(@RequestBody ModifyMemberLevelParam param);

    @DeleteMapping("/level")
    public Result delMemberLevel(@RequestParam("memberLevelId") Integer memberLevelId);

    @GetMapping("/level")
    public Result<List<MemberLevelDto>> getMemberLevel();

    @GetMapping("/getLevelById")
    public Result<List<MemberLevelDto>> getLevelById(@RequestParam("storeId") Integer storeId);



}
